<%@ page language="java" contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<script>
var settings ={
		check: {
			enable: true
		},
		data: {
			simpleData: {
				enable: true
			}
		}
};
var zTreeNodes2;
$(document).ready(function(){
	$.ajax({
		async : false,
		cache:false,
		type: 'GET',
		contentType : 'application/json',
		dataType : "json",
		url: "/MSAPortal/Portalrole/getPortlet.do",//请求的action路径
		success:function(data){ //请求成功后处理函数。 
			zTreeNodes2 = data; //把后台封装好的简单Json格式赋给treeNodes
			},
		error: function () {//请求失败处理函数
		alert('请求失败');
		}
		});
	ztreep =$.fn.zTree.init($("#ptree"), settings, zTreeNodes2);
});

</script>
<div class="col-sm-10">
	<ul id="ptree" class="ztreep" style="width:460px; overflow:auto;"></ul>
</div>